/**
 * @Copyright ®2017 Sinosoft Co. Ltd. All rights reserved.<br/>
 * 项目名称 : 交银康联智能运营平台
 * 创建日期 : 2017年5月24日
 * 修改历史 : 
 *     1. [2017年5月24日]创建文件 by sinosoft
 */
package com.darth.common.enums;

/**  
 * 【银行编码枚举】
 * @author sinfosoft
 * @date 2017年5月24日 下午4:56:24 
 * @version V1.0  
*/
public enum ENUM_UNION_BANK_CODE {
    BANK_NAME1("86060000","交通银行","5000000.00"),      //
    BANK_NAME2("86020000","工商银行","500000.00"),  
    BANK_NAME3("86120000","建设银行","50000.00"),
    BANK_NAME4("86080000","",""),      //民生银行
    BANK_NAME5("86030000","农业银行","20000.00"),
    BANK_NAME6("86250000","",""),      //平安银行
    BANK_NAME7("86110000","浦发银行","5000.00"),
    BANK_NAME8("86130000","兴业银行","1000000.00"),
    BANK_NAME9("86040000","中国银行","100000.00"),
    BANK_NAME10("86200000","",""),     //中信银行
    BANK_NAME11("86090000","招商银行","200000.00"),//单笔20万，批量500万
    BANK_NAME12("86210000","广发银行","500000.00"),
    BANK_NAME13("86070000","光大银行","500000.00"),
    BANK_NAME14("86240000","华夏银行","1000000.00"),
    BANK_NAME15("86310000","北京银行","1000000.00"),
    BANK_NAME16("86490000","广州银行","50000.00");
    
    
    /**
    *
    * @param code          银行编码
    * @param desc          银行名称
    * @param limitcredit   单笔限额
    */
    private final String code;
    private final String desc;
    private final String limitcredit;
    
    ENUM_UNION_BANK_CODE(String code, String desc, String limitcredit) {
       this.code = code;
       this.desc = desc;
       this.limitcredit = limitcredit;
   }

   public String code() {
       return code;
   }

   public String desc() {
       return desc;
   }
   
   public String limitcredit() {
       return limitcredit;
   }
   
   /**
    * 根据code获得limitcredit
    * @return
    */
   public static String getEnumLimitCreditByKey(String code) {
       for (ENUM_UNION_BANK_CODE enumItem : ENUM_UNION_BANK_CODE.values()) {
           if (enumItem.code().equals(code)) {
               return enumItem.limitcredit();
           }
       }
       return "";
   }
   
   /**
    * 根据code获得desc
    * @return
    */
   public static String getEnumDescByKey(String code) {
       for (ENUM_UNION_BANK_CODE enumItem : ENUM_UNION_BANK_CODE.values()) {
           if (enumItem.code().equals(code)) {
               return enumItem.desc();
           }
       }
       return "";
   }
}
